import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download
} = request

// 查询树形数据全部
export const treeDataList = data => {
    return $get('/risk/treeData/list', data)
}

export const treeDataChild = data => {
  return $get('/risk/treeData/findChild', data)
}

// 查询树形数据列表
export const treeDataPage = data => {
    return $get('/risk/treeData/page', data)
}

// 新增树形数据
export const treeDataAdd = data => {
    return $post('/risk/treeData/add', data)
}

// 查询树形数据详情
export const treeDataDetail = id => {
    return $get('/risk/treeData/detail/'+ id)
}

// 更新树形数据
export const treeDataUpdate = data => {
    return $post('/risk/treeData/update', data)
}

// 删除树形数据
export const treeDataDelete = id => {
    return $post('/risk/treeData/delete/'+ id)
}

// 导出树形数据
export const treeDataExport = (data,fileName) => {
    return $download('/risk/treeData/export',data, fileName)
}
